package com.ruoyi.shenhe.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shenhe.mapper.ApprovedMapper;
import com.ruoyi.shenhe.domain.Approved;
import com.ruoyi.shenhe.service.IApprovedService;
import com.ruoyi.common.core.text.Convert;

/**
 * 申请审核Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-05
 */
@Service
public class ApprovedServiceImpl implements IApprovedService 
{
    @Autowired
    private ApprovedMapper approvedMapper;

    /**
     * 查询申请审核
     * 
     * @param id 申请审核主键
     * @return 申请审核
     */
    @Override
    public Approved selectApprovedById(Long id)
    {
        return approvedMapper.selectApprovedById(id);
    }

    /**
     * 查询申请审核列表
     * 
     * @param approved 申请审核
     * @return 申请审核
     */
    @Override
    public List<Approved> selectApprovedList(Approved approved)
    {
        return approvedMapper.selectApprovedList(approved);
    }

    /**
     * 新增申请审核
     * 
     * @param approved 申请审核
     * @return 结果
     */
    @Override
    public int insertApproved(Approved approved)
    {
        return approvedMapper.insertApproved(approved);
    }

    /**
     * 修改申请审核
     * 
     * @param approved 申请审核
     * @return 结果
     */
    @Override
    public int updateApproved(Approved approved)
    {
        return approvedMapper.updateApproved(approved);
    }

    /**
     * 批量删除申请审核
     * 
     * @param ids 需要删除的申请审核主键
     * @return 结果
     */
    @Override
    public int deleteApprovedByIds(String ids)
    {
        return approvedMapper.deleteApprovedByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除申请审核信息
     * 
     * @param id 申请审核主键
     * @return 结果
     */
    @Override
    public int deleteApprovedById(Long id)
    {
        return approvedMapper.deleteApprovedById(id);
    }
}
